﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"  Theme="SkinFile"
    CodeFile="Client_Info.aspx.cs" Inherits="Client_Info" Title="客户信息" Culture="auto"
    UICulture="auto" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <h1 id="pagetitle" class="pagetitle">
        客户信息管理
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <div class="anistyle" id="ani">
                    正在加载数据，请耐心等待...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    </h1>

    <script type="text/javascript">
        function SelectItem(obj)
        {
            window.returnValue=obj; 
            self.close();
        }
    </script>

    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <table class="condition">
                <tr>
                    <td>
                        <span>客户编号：</span><asp:TextBox ID="TxtClient_ID" runat="server" Width="172px"></asp:TextBox>
                        <span>客户名称：</span><asp:TextBox ID="TxtCorp_Name" runat="server" Width="172px"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Button ID="BtnQuery" runat="server" Text="查询信息" Width="80px" OnClick="BtnQuery_Click" />&nbsp;<asp:Button
                            ID="CreateGo" runat="server" Text="创建新客户" Width="90px" OnClick="CreateGo_Click" />
                    </td>
                </tr>
            </table>
            <div runat="server" id="divResult" class="divResult">
                <asp:Label ID="OperationResult" CssClass="result" runat="server" Text=""></asp:Label>
            </div>
            <div class="InfoArea">
                <asp:Panel ID="SummaryPanel" runat="server" Width="100%">
                    <asp:GridView ID="ClientGridView" runat="server" AutoGenerateColumns="False" Width="100%"
                        DataKeyNames="Client_ID"  SkinID="gridviewSkin">
                        <%--<RowStyle BackColor="#EFF3FB" Height="24px" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Height="24px" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />--%>
                        <Columns>
                            <asp:BoundField DataField="Client_ID" HeaderText="客户编号">
                                <HeaderStyle Width="60px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Corp_Name" HeaderText="单位名称">
                                <HeaderStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Linkman" HeaderText="联系人">
                                <HeaderStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Phone" HeaderText="联系电话">
                                <HeaderStyle Width="60px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="email" HeaderText="电子邮箱">
                                <HeaderStyle Width="80px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Create_Time" DataFormatString="{0:yyyy-MM-dd }" HtmlEncode="False"
                                HeaderText="创建日期">
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <asp:LinkButton ID="GvEdit" runat="server" OnClick="GvEdit_Click">编辑</asp:LinkButton>
                                    <asp:LinkButton ID="GvDelete" runat="server" OnClick="GvDelete_Click" OnClientClick="javascript:return confirm('您确定要删除此条记录吗？');">删除</asp:LinkButton>
                                    <asp:LinkButton ID="GvDetail" runat="server" OnClick="GvDetail_Click">详细</asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" Width="100px" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <webdiyer:AspNetPager ID="AspNetPager" runat="server" ShowCustomInfoSection="Left"
                        CustomInfoHTML="总记录数：%RecordCount%，总页数：%PageCount%，当前为第%CurrentPageIndex%页" CustomInfoTextAlign="left"
                        CustomInfoStyle="padding-top:8px;font-weight:bold;" HorizontalAlign="right" FirstPageText="首页"
                        LastPageText="尾页" NextPageText="下一页" OnPageChanged="AspNetPager_PageChanged"
                        PrevPageText="上一页" ShowPageIndexBox="Always" SubmitButtonText="Go" TextAfterPageIndexBox="页"
                        TextBeforePageIndexBox="转到" CssClass="anpager" CurrentPageButtonClass="cpb">
                    </webdiyer:AspNetPager>
                </asp:Panel>
                <asp:Panel ID="EditPanel" runat="server" Width="100%">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px; height: 24px;">
                                &nbsp;&nbsp;客户编号：</td>
                            <td style="width: 400px;">
                                <asp:Label ID="EditClient_ID" runat="server" Width="151px" class="id"></asp:Label></td>
                            <td style="width: 150px;">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px; height: 24px;">
                                &nbsp;&nbsp;单位名称：</td>
                            <td colspan="2">
                                <asp:TextBox ID="EditCorp_Name" runat="server" MaxLength="200" ValidationGroup="Edit"
                                    Width="99%"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="EditFullNameRequired" runat="server" ControlToValidate="EditCorp_Name"
                                    Display="Dynamic" ErrorMessage="请输入客户单位名称！" ValidationGroup="Edit"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;委托人姓名：</td>
                            <td>
                                <asp:TextBox ID="EditConsigner" runat="server" MaxLength="50" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;联系人：</td>
                            <td>
                                <asp:TextBox ID="EditLinkman" runat="server" MaxLength="50" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;固定电话：</td>
                            <td>
                                <asp:TextBox ID="EditTel" runat="server" MaxLength="50" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;移动电话：</td>
                            <td>
                                <asp:TextBox ID="EditPhone" runat="server" MaxLength="50" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;传&nbsp; 真：</td>
                            <td>
                                <asp:TextBox ID="EditFax" runat="server" MaxLength="50" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp; 地&nbsp; 址：</td>
                            <td colspan="2">
                                <asp:TextBox ID="EditAddr" runat="server" MaxLength="200" ValidationGroup="Edit"
                                    Width="99%"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;邮政编码：</td>
                            <td>
                                <asp:TextBox ID="EditPostcode" runat="server" MaxLength="20" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;电子邮件：</td>
                            <td>
                                <asp:TextBox ID="Editemail" runat="server" MaxLength="100" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;客户密码：</td>
                            <td>
                                <asp:TextBox ID="EditPWD" runat="server" MaxLength="50" ValidationGroup="Edit"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td class="tblfooter" colspan="3" align="right">
                                <asp:Button ID="EditSave" runat="server" Text="保 存" Width="90px" OnClick="EditSave_Click"
                                    ValidationGroup="Edit" />
                                <asp:Button ID="EditBack" runat="server" Text="返 回" Width="90px" OnClick="EditBack_Click" /></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="CreatePanel" runat="server" Width="100%">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px; height: 24px;">
                                &nbsp;&nbsp;客户编号：</td>
                            <td style="width: 400px;">
                                <asp:Label ID="CreateClient_ID" runat="server" Width="151px" class="id"></asp:Label></td>
                            <td style="width: 150px;">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px; height: 24px;">
                                &nbsp;&nbsp;单位名称：</td>
                            <td style="width: 400px;">
                                <asp:TextBox ID="CreateCorp_Name" runat="server" MaxLength="200" ValidationGroup="Create"
                                    Width="99%"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2"
                                        runat="server" ControlToValidate="CreateCorp_Name" Display="Dynamic" ErrorMessage="请输入客户单位名称！"
                                        ValidationGroup="Create"></asp:RequiredFieldValidator></td>
                            <td style="width: 150px;">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;委托人姓名：</td>
                            <td>
                                <asp:TextBox ID="CreateConsigner" runat="server" MaxLength="50" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;联系人：</td>
                            <td>
                                <asp:TextBox ID="CreateLinkman" runat="server" MaxLength="50" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;固定电话：</td>
                            <td>
                                <asp:TextBox ID="CreateTel" runat="server" MaxLength="50" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;移动电话：</td>
                            <td>
                                <asp:TextBox ID="CreatePhone" runat="server" MaxLength="50" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;传&nbsp; 真：</td>
                            <td>
                                <asp:TextBox ID="CreateFax" runat="server" MaxLength="50" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;地&nbsp; 址：</td>
                            <td colspan="2">
                                <asp:TextBox ID="CreateAddr" runat="server" MaxLength="200" ValidationGroup="Create"
                                    Width="99%"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;邮政编码：</td>
                            <td>
                                <asp:TextBox ID="CreatePostcode" runat="server" MaxLength="20" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;电子邮件：</td>
                            <td>
                                <asp:TextBox ID="Createemail" runat="server" MaxLength="100" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;客户密码：</td>
                            <td>
                                <asp:TextBox ID="CreatePWD" runat="server" MaxLength="50" ValidationGroup="Create"></asp:TextBox></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td class="tblfooter" colspan="3" align="right">
                                &nbsp;<asp:Button ID="CreateSave" runat="server" Text="保 存" Width="90px" OnClick="CreateSave_Click"
                                    ValidationGroup="Create" />
                                <asp:Button ID="CreateBack" runat="server" Text="返 回" Width="90px" OnClick="CreateBack_Click" /></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="DetailPanel" runat="server" Width="100%">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px; height: 24px;">
                                &nbsp;&nbsp;客户编号：</td>
                            <td style="width: 400px;">
                                <asp:Label ID="DetailClient_ID" runat="server" Width="100%" class="id"></asp:Label></td>
                            <td style="width: 150px;">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px; height: 24px;">
                                &nbsp;&nbsp;单位名称：</td>
                            <td style="width: 400px;">
                                <asp:Label ID="DetailCorp_Name" runat="server" Width="100%"></asp:Label></td>
                            <td style="width: 150px;">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;委托人姓名：</td>
                            <td>
                                <asp:Label ID="DetailConsigner" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;联系人：</td>
                            <td>
                                <asp:Label ID="DetailLinkman" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;固定电话：</td>
                            <td>
                                <asp:Label ID="DetailTel" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;移动电话：</td>
                            <td>
                                <asp:Label ID="DetailPhone" runat="server" Width="100%"></asp:Label></td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;传&nbsp; 真：</td>
                            <td>
                                <asp:Label ID="DetailFax" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;地&nbsp; 址：</td>
                            <td colspan="2">
                                <asp:Label ID="DetailAddr" runat="server" Width="100%"></asp:Label></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;邮政编码：</td>
                            <td>
                                <asp:Label ID="DetailPostcode" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;电子邮件：</td>
                            <td>
                                <asp:Label ID="Detailemail" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 24px;">
                                &nbsp;&nbsp;客户密码：</td>
                            <td>
                                <asp:Label ID="DetailPWD" runat="server" Width="100%"></asp:Label></td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td class="tblfooter" colspan="3">
                                <asp:Button ID="EditGo" runat="server" Text="修 改" Width="90px" OnClick="EditGo_Click" />
                                <asp:Button ID="DeleteGo" runat="server" OnClientClick="javascript:return confirm('您确定要删除此条记录吗？');"
                                    Text="删 除" Width="90px" OnClick="DeleteGo_Click" />
                                <asp:Button ID="DetailBack" runat="server" Text="返 回" Width="90px" OnClick="DetailBack_Click" /></td>
                        </tr>
                        <tr>
                            <td style="height: 1px; background-color: #F0F0F0;" colspan="3">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
